package one.bugu.android.demon.ui.activity;

import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

import com.juefeng.android.framework.view.annotation.LKContentView;
import com.juefeng.android.framework.view.annotation.LKInjectView;

import one.bugu.android.demon.R;
import one.bugu.android.demon.common.MyBaseActivity;
import one.bugu.android.demon.constant.Constant;
import one.bugu.android.demon.util.IntentUtils;
import one.bugu.android.demon.util.PreferencesUtil;

/**
 * 新手引导界面, 显示已注册人数
 */
@LKContentView(R.layout.activity_guide)
public class GuideActivity extends MyBaseActivity{

    /**
     * 快速添加按钮
     */
    @LKInjectView(R.id.guideBtn_add)
    private Button btnAdd;

    /**
     * 跳过按钮
     */
    @LKInjectView(R.id.guide_jump)
    private LinearLayout btnJump;

    String token;

    @Override
    protected void initView() {
        super.initView();

        token = PreferencesUtil.getInstance().getString(GuideActivity.this, Constant.TOKEN);

    }

    @Override
    protected void initData() {
        super.initData();
    }

    @Override
    protected void initEvent() {
        super.initEvent();

        //快速添加点击事件, 跳转添加币页面
        btnAdd.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(GuideActivity.this, AddCoinActivity.class);
                //标记为新用户
                intent.putExtra("isNew",true);
                startActivity(intent);
                finish();
            }
        });

        //跳过点击事件, 跳转预警主界面
        btnJump.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                IntentUtils.startAty(GuideActivity.this, WarnMainActivity.class);
                finish();
            }
        });
    }
}
